package com.vehicle.controller;

import com.vehicle.bean.DataGridView;
import com.vehicle.service.ViolationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/violation")
public class ViolationController {
    @Autowired
    private ViolationService violationService;
    @ResponseBody
    @RequestMapping(value = "/allViolation")
    public DataGridView allViolation(){
        return violationService.findAllViolation();
    }
}
